package com.wan.api.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.wan.service.IGameLoginService;
import entity.ResultBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xzx
 * @date 2021/4/14 13:07
 */
@RestController
@RequestMapping("/bs/game")
public class GameLoginController {

    @Autowired
    private IGameLoginService loginService;


    @RequestMapping("/login")
    public ResultBean gameLogin(@RequestBody String str){
        JSONObject jsonObject = JSON.parseObject(str);
        String number = jsonObject.getString("number");
        String password = jsonObject.getString("password");
        return loginService.gameLogin(number,password);
    }
}
